/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.OrderDao;
import com.techshop.model.Order;
import com.techshop.service.OrderService;
import java.util.List;

/**
 *
 * @author Hai-PC
 */
public class OrderServiceImpl implements OrderService
{    
    private OrderDao orderDao;

    @Override
    public List<Order> getAll()
    {
        return orderDao.getAll();
    }
    
    @Override
    public Order getById(int deliveryNoteID)
    {
        return orderDao.getById(deliveryNoteID);
    }

    @Override
    public boolean insert(Order deliveryNote)
    {
        return orderDao.insert(deliveryNote);
    }

    @Override
    public boolean update(Order deliveryNote)
    {
        return orderDao.update(deliveryNote);
    }

    @Override
    public boolean delete(Order deliveryNote)
    {
        return orderDao.delete(deliveryNote);
    }

    /**
     * @return the orderDao
     */
    public OrderDao getOrderDao()
    {
        return orderDao;
    }

    /**
     * @param orderDao the orderDao to set
     */
    public void setOrderDao(OrderDao orderDao)
    {
        this.orderDao = orderDao;
    }

    @Override
    public List<Order> search(String phone, String date, boolean state, int storeId)
    {
        return orderDao.search(phone, date, state, storeId);
    }

    @Override
    public List<Order> searchNotStore(String phone, String date, boolean state)
    {
        return orderDao.searchNotStore(phone, date, state);
    }
}